﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using SharpArch.Domain.DomainModel;

namespace DevelopmentKit.Cms.Domain
{
    /// <summary>
    /// 内容模版
    /// </summary>
    public class ViewTemplate : Entity
    {

        /// <summary>
        /// 企业Id
        /// </summary>
        [Display(Name = "企业Id")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual int EnterpriseId { get; set; }
        /// <summary>
        /// 模版名称
        /// </summary>
        [Display(Name = "名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(128, ErrorMessage = "{0}取值长度{1}~{2}个字符", MinimumLength = 0)]
        public virtual string Name { get; set; }
        /// <summary>
        /// 模版路径
        /// </summary>
        [Display(Name = "模版路径")]
        [StringLength(500, ErrorMessage = "{0}取值长度{1}~{2}个字符", MinimumLength = 0)]
        public virtual string Path { get; set; }

        /// <summary>
        /// 布局文件模版路径
        /// </summary>
        [Display(Name = "布局路径")]
        [StringLength(500, ErrorMessage = "{0}取值长度{1}~{2}个字符", MinimumLength = 0)]
        public virtual string Layout { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注")]
        [StringLength(500, ErrorMessage = "{0}取值长度{1}~{2}个字符", MinimumLength = 0)]
        public virtual string Remark { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual DateTime Created { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual DateTime Modified { get; set; }
    }
}